Forum:Infobox Colours and Reformation
Users here because of the Sitenotice, who want to get straight to the point, please click here. As a couple of you may know, I've been working on a knew infobox system, as our current one has a problem with the colours. I have also had a re-structuring idea to make it easier for us all to edit it. This is the structure. (Every page uses the template(s) below it.) Articles │ │ An Infobox (ie. Template:Set) │ ┌──────────────┬┴───────────┬───────┐ │ │ │ │ tl:Infobox tl:TitleTextColour tl:Bkg1 tl:Bkg2 The first template is the Infobox template. This is essentially an infobox (exactly the same style as the current one) with no colours or text labels. This is the heavy code. Then we have the actual infobox. This contains the above template. Each cell in the infobox has three parameters in this template, with a further three parameters specifying the colours. TitleTextColour is a template that switches it's outcome depending on the theme string in the infobox. As far as I can see, this can hive unlimited slots. Bkg1 specifies the header colour. It, again, switches it's outcome depending on the theme string in the infobox. As far as I can see, this can have unlimeted slots also. Bkg2 specifies the main colour. It, again, switches it's outcome depending on the theme string in the infobox. As far as I can see, this can have unlimited slots also. And finally, the code on the actual article doesn't change at all. I have constructed all of the above templates in my userspace. They are here; * An Article * The new Template:Set * Template:Infobox * The new Template:TitleTextColour * The new Template:Bkg1 * The new Template:Bkg2 If you would like to see the colours in action, feel free the change the theme string on the example to either "hot" or "cool". I will continue to add examples and colour schemes. I now want to know what you think... Thanks for reading, 15:33, August 2, 2011 (UTC) Discussion :Why not combine TitleTextColor, Bkg1, and Bkg2 into one big template (like GetColor or something)? FB100Z • talk • 23:45, August 2, 2011 (UTC) * Hey, passed through here a while ago and saw you working on the template, I'm happy to help out with it if you want any (will just be here only for the template though). So far, it looks good. But, there are a couple of problems (actually this test is very similar to the one Jag tried a while back). *# Easiest to explain first. This test template works fine if you have the exact word in the infobox, but only if there are exactly the same. eg, "hot" works, but what about "hot" or giving it subthemes like "hot pink"? That's why there's all those #pos: 's and other things in the current template. *# There isn't any problem with the current template when there are only 3 entries. When you get to around however many are stored in Template:Bkg1A, you run into problems. In this case, LegOtaku solved it by splitting the Bkg templates into Bkg1A (or 2A) and Bkg1B (or 2B). And that worked for a while. But then came the time when we needed a 35th colour. Before, when new colours were needed, you simply added a slot to Template:TitleTextColor to get the text colour working. Adding that 35th slot made everything go white (or, sometimes a dark blue which doesn't even appear in the code anywhere). And now, even removing that 35th slot still makes everything stay white. Why? I have no idea, like I've said many times, I think the only person who can save this template is LegOtaku, unless we come up with an entirely new approach. Also, I *think* (can't remember) that the B's are full as well, and adding anything to them ruins the other colours. I've tried in the past to make a C, but that never worked for some reason. * Anyway, let me know if you do want me to help out with it. On the most part, I couldn't be bothered coming back, but I've wanted revenge on this infobox for a few years now so I can make an exception :) 00:28, August 3, 2011 (UTC) This forum is a conspiracy against me. You guys know I'm not good with Wikia coding or big words... - 02:14, August 3, 2011 (UTC) :It's not the big words; it's the tl;dr. FB100Z • talk • 03:17, August 3, 2011 (UTC) *Um...I'll leave you lot to it..... - Kingcjc 07:00, August 3, 2011 (UTC) *NHL, ever thoought about this? Revenge of the Sith|]|0}}|[|2}} which goes to " Revenge of the Sith|]|0}}|[|2}}" 08:24, August 3, 2011 (UTC) *Does that work for sub-themes? If you put DUPLO Winnie the Pooh it will take DUPLO instead of Winnie the Pooh. (though that doesn't currently have a scheme). - Kingcjc 11:15, August 3, 2011 (UTC) * @NXT: Nice, nope I never thought of using the [ ]'s as markers. Doing that might make things extremely easy. I'll try something now... 11:29, August 3, 2011 (UTC) :*CJC, It will always take the first link (though I should be able to make exceptions), and NHL, I see you've been using #replace, but why? 12:42, August 3, 2011 (UTC) ::*I've got problems with spaces which I need removed, see User_talk:Nighthawk_leader/infobox. I've got to go inactive for a while, but I'll work on it when I can (or if you know how to fix it easily, feel free to just go ahead and do it). What I'm trying to do is bypass the Bkg1 templates (Template:Bkg1, Template:Bkg1A, Template:Bkg1B) which tell the infobox which theme templates to call on, and to instead tell the infobox to go to the directly to the templates it wants. That way it should eliminate any overloading problems with bkg1 and 2. (sorry if this doesn't make sense, typing this in a hurry) 13:05, August 3, 2011 (UTC) :::*NHL, the whole point of this was to simplify it, so we only need 5 templates. I don't see much simplifying there, unless there is something I don't know, in which case I've got at you for no reason. :( 13:15, August 3, 2011 (UTC) *'''We can have many many colour schemes! I've put more than 60 into Bkg1, and they all work! 13:07, August 3, 2011 (UTC) * Wow, well done :) Don't have time to look at it, but I'll take your word for it :) 13:09, August 3, 2011 (UTC) Again I can say, if it's easy/simple, it's not meant for Brickipedia. :P - 13:20, August 3, 2011 (UTC) :We need to change that view! Aww who cares, complex things are fun. 13:21, August 3, 2011 (UTC) *As well as the double explode, I've added an #if and a #pos, so that if a theme is not linked, it will work in some cases (when the theme is one word, see here) 14:17, August 3, 2011 (UTC) *'Got it'. If a subtheme has colours aswell as the theme, we integrate another switch. This switch finds the second thing in the theme field, the subtheme, and tries to match it. If no match is found, the theme's colours are used. Look at this: |Harry Potter = #4E448D |Castle = }|2}} |Kingdoms = Kingdoms Colour (subtheme) |Castle (2007) = Castle (2007) Colour (subtheme) |#default = Main Castle Colour (theme) }} | Star Wars = #BLAH :I have also put the #if/#pos/#explode/#replace code into GetTheme, to make adding these extra switches easier. GetTheme takes two parameters. The "Theme" should always be filled with }, the "Position" with the number of (sub)theme you require, as in 1 would give the first theme given (on the actual page), 2 the second. 12:42, August 4, 2011 (UTC) ::See User:UltrasonicNXT/An Article#CJC's Problem. If "Castle" is given, the Castle colours are given. If "Castle / / Castle (2007)" the Castle (2007) Colours are given. If "Castle / / Kingdoms" is given, the Castle colours are given because I did not give a Kingdoms one. 13:49, August 4, 2011 (UTC) * Have you thought about importing Wikipedia:Template:Infobox instead? --Odie5533 06:26, August 22, 2011 (UTC) **Wouldn't that be the same concept as this, but without the colour system? - Kingcjc 19:55, August 22, 2011 (UTC) General Summary:The above comments say that a new infobox system has been developed (in my userspace). This system uses an infobox template aswell as a set/minifigure/theme/ect template. This means that the heavy coding is on the infobox template, leaving the set/minifigure/theme/ect template easier to edit and add new sections. Alongside this, a new system has been developed, so we can have many more infobox colours. I now need community consensus so I can carry on building the colour schemes and templates, and, eventually, put them into use. Voting Support - Yet to actually use it, but seems to do the same thing, but simpler. (and fixes the colour issue) - Kingcjc 14:58, August 4, 2011 (UTC) Support As long as it's simple...and I mean my kind of simple, not NXT's... - 14:37, August 5, 2011 (UTC) :Nerf, if you can't do the simple bit, then you need to see a doctor :D 14:57, August 5, 2011 (UTC) ::Well I voted. Just be happy I know how to bathe myself at this point. :P - 17:54, August 5, 2011 (UTC) Weak Support per us still need to add / to articles..(I could probably fix it to where you need no break tags- I just don't have the time) 16:37, August 6, 2011 (UTC) Comment - BUMP. - Kingcjc 11:24, August 15, 2011 (UTC) * (been meaning to check back on this for a while now) Nice job NXT, did a few previews and I can't find anything wrong with it :) 12:20, August 16, 2011 (UTC) Comment - BUMP 2 - Kingcjc 21:07, August 21, 2011 (UTC) Support 02:47, August 23, 2011 (UTC) Support'''I have edited a this wiki alot and think this would be good for the wiki!Bob bricks 14:37, August 23, 2011 (UTC) Update The new infobox is open for beta-testing! User:UltrasonicNXT/Set and User:UltrasonicNXT/Minifigure will adapt to '''any of the current colour schemes, and User:UltrasonicNXT/Person shows the second style. Feel free to add more testcases to User:UltrasonicNXT/An Article! 09:48, August 26, 2011 (UTC) Right. We have a positive concensus, so I am about to complete step 1 of putting it through. This involves putting Infobox2 in the mainspace, and adapting Person, to fit with it. This will show any problems with these two. If anything goes wrong, or not as it should be, please say. :That went fine. All is well. 15:56, September 4, 2011 (UTC) Step 2. Putt Infobox in the mainspace, and adapt Animal. 18:30, September 6, 2011 (UTC) :All Fine. ::Good :) - Kingcjc 12:54, September 7, 2011 (UTC) * Ok, I'm a little confused... last time I looked at this, everything looked great, but this test page shows the set infobox's bkg1 always as white, and the current templates, which I'm assuming have been changed with some code from this, has the text colour as white nomatter what theme is being used, which was one of the big problems that the original infoboxes had. I was just under the impression that this had all been sorted out, I know it seemed to be working great to me when I tested it months ago... 12:56, September 9, 2011 (UTC) **Sorry about that, was moving some pages to more user-friendly names, and same with some strings. Will sort it out when PC back working. NXT. (PC problems) Step 3. Put the rest of the high-level templates into the mainspace, and minifigure. :Twas good. * Title text colour still appears to be always white (tested on set and minifigure. sorry if the reason why is you just haven't got around to that yet) 09:44, September 11, 2011 (UTC) :*That'll be because none of the themes declared in use black, except default! * I got some problems with . Working on it. :*Solved it. ::* Well done, looking good :) I added support for "Harry Potter (Theme)", it's an older convention but still widely used, hope I didn't break anything. The only thing I can see wrong now is those infoboxes using , but what you've done is definitely a vast improvement :) I'd be happy to work on adding support for the th template in 24 hrs or so if you want a break 12:56, September 11, 2011 (UTC) :::*Ah Yes. Probably the only way is to add entries for all possible entries. ::::*See the HP entries now. This is how we should do it. :::::*Done all the ones I thought this will apply to ::::: . - Kingcjc 15:49, September 11, 2011 (UTC) ::::::Done (if you only mean the infobox on that page). 00:41, September 12, 2011 (UTC) :Added support for Harry Potter with HARRY POTTER (THEME) HARRY POTTER, will get around to doing others when I can. The doesn't appear to be working. I think this is because the template looks for and doesn't it? And since it's instead, it won't find anything. Also, I've removed a stack of themes from - a lot of them are meant to have black text. It showed up at Brickipedia:Infobox Colours as white text because the old templates thought every theme was white for whatever reason. The original colours were all archived at Brickipedia talk:Infobox Colours, so I went through and removed the themes that didn't have the "uses white heading text" line (if they didn't have that line, they were nominated with black text). : We also appear to have some issues with the subtheme thing, take Commander Gree for example- it's just showing up as default colours. Can that be fixed by just adding a "default" under Star Wars, and setting it to the Star Wars colours? There's also an issue I found with - the example I came across was . Some of it was released under the subtheme of Studios, and it has Studio colours instead of Spider-Man. I'm not really sure about how to go about fixing that... (if I'm getting too annoying with finding all these problems, let me know and I'll stop :D) 00:41, September 12, 2011 (UTC) ::The Gree one was because of the italics. That's fixed :::And no, keep telling me of any problems. :::: . I sorted this so it takes the Title normally, but if there is something in the Subtheme of, it uses that. This was so pages like Star Wars: The Clone Wars would take the starwars colours. This clearly needs changing, but how, I'm not sure. :::::Tried variations on Theme= }}}|white|Theme= }|Theme= } }}}} (code doesn't fully work), but then I realised that some background colours are going to be white, so it wouldn't work (at the time was thinking of the DEDDE2 header, and we could make sure that colour's never used). So unless we change the default background colour to something like #FFFFFE, this probably isn't worth trying to get working. I'll see if I can think up any other way to get it working. 00:23, September 17, 2011 (UTC) ::::::I've thought up a new code for GetTheme, and am about to implement it. This will hopefully solve the problem. :::::::And I recon a variation on your code above should work. Testing whether the header colour ends up as default. * Something's wrong. On pages, everything is showing default. However on previews, everything is showing fine. I reverted GetTheme to the older code, but no difference. Everything seems to be performing fine. I don't have a clue why it is not working. :*Some are working all round (eg. Online Game) Some only on the template page (eg. Minifigure) and some not at all (eg. Set). ::*Partly a subtheme issue. :::*Oh. According to User:UltrasonicNXT/Sandbox2#Help, that shouldnt be an issue. All fine there. ::::* Everything's looking fine here. Great job with the GetTheme template, that's a lot of nested replaces there, not even going to try to work out how it works ;) 23:54, September 17, 2011 (UTC) :::::*The new code used , (or br) to explode it. This gets around the issue. I also wrote an explanation inside the template. * About the theme/subtheme code, I've got something that I think should work, and the example I have works fine, but when I implement it, it's wrong (code here, examples here). Any idea why it isn't working? 00:49, September 18, 2011 (UTC) *It seems the only problem now is the theme/subtheme thing. I'm testing my code. *User:UltrasonicNXT/Theme2Test. It works. I've implemented it. ** Nice work- that's everything working now isn't it? So what was wrong with my code? It looks very similar to what's been implemented :S Your code definitely makes more sense (still don't know why mine didn't work though. But as long as it works :D). Great idea comparing the headers for the background section- I wouldn't have thought of that, I probably would've ended up changing the default background colour, so this is much better :) 00:05, September 19, 2011 (UTC) ***I love the way you have already deleted your tests, but I still have everyone Ive ever made. =D * I am starting to document the templates, if anyone wants to know.